import java.util.Scanner;
public class Zuoye3 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int sum = 0;
        System.out.print("请输入任意一个整数：");
        int t = in.nextInt();
        while(t!=0)
        {
            sum +=t % 10;
            t = t / 10;
        }
        System.out.println("各位数字的和：" + sum);
    }
}
